package com.tanfuqi.sicent.server.handler

import org.apache.mina.core.service.IoHandler
import org.apache.mina.core.session.IdleStatus
import org.apache.mina.core.session.IoSession

class MinaServerHandler : IoHandler {
    override fun messageReceived(p0: IoSession?, p1: Any?) {
        println(p1)
    }

    override fun sessionOpened(p0: IoSession?) {
    }

    override fun sessionClosed(p0: IoSession?) {
    }

    override fun messageSent(p0: IoSession?, p1: Any?) {
    }

    override fun sessionCreated(p0: IoSession?) {
    }

    override fun sessionIdle(p0: IoSession?, p1: IdleStatus?) {
    }

    override fun exceptionCaught(p0: IoSession?, p1: Throwable?) {
        p1?.printStackTrace()
    }

}
